import { get } from "../../utils/db";
const app=getApp()
let audioManager=app.globalData.audioManager;
Page({
  data:{
    list:[],    //播放列表
  },
  async onShow(){
    var result =await get({
      collection:"record"
    }).catch(err=>{
      console.error(err)
    })
    // console.log(result)
    this.setData({
      list:result.data
    })
  },
  //播放
  play(e){
    // console.log(e)
    let {src}=e.target.dataset;
    // console.log(audioManager)
    audioManager.src=src;
    audioManager.play()
    audioManager.onPlay

  }
})